#include "StdAfx.h"
#include "ConnectDB.h"
//#pragma comment(lib, "libmysql.lib")

CConnectDB::CConnectDB(void)
{
}


CConnectDB::~CConnectDB(void)
{
}

bool CConnectDB::Connect()
{
	mysql_init(&m_sqlCon);
	//
	if (!mysql_real_connect(&m_sqlCon, "localhost", "root", "123456", "zhw", 3306, NULL, 0))
	{
		AfxMessageBox(_T("connect faild"));
		return false;
	}

//	AfxMessageBox(_T("connect success"));
	return true;
}